package com.tedu.DbDemo.controller;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.tedu.DbDemo.mapper.ItemMapper;
import com.tedu.DbDemo.pojo.Item;

@RestController
public class ItemController {
	@Autowired
	ItemMapper itemMapper;
	@RequestMapping("/item/selectByList")
	public List<Item> selectByList(){
		ArrayList<Integer> list=new ArrayList<Integer>();
		list.add(2);
		list.add(3);
		list.add(4);
		List<Item> itemList=itemMapper.selectByList(list);
		return itemList;
	}
	
	@RequestMapping("/item/select1")
	public List<Item> select1(Item item){
		List<Item> itemList=itemMapper.select1(item);
		return itemList;
	}

}
